<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- Apple devices fullscreen -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link href="__SKIN__/css/main.css?v={$version}" rel="stylesheet" type="text/css">
<link href="__SKIN__/font/css/font-awesome.min.css?v={$version}" rel="stylesheet" />
<link href="__SKIN__/css/index.css?v={$version}" rel="stylesheet" type="text/css">
<!--[if IE 7]>
  <link rel="stylesheet" href="__SKIN__/font/css/font-awesome-ie7.min.css">
<![endif]-->
<link href="__SKIN__/css/diy_style.css?v={$version}" rel="stylesheet" type="text/css" />
{include file="public/theme_css" /}
<script type="text/javascript">
    var eyou_basefile = "{$Request.baseFile}";
    var module_name = "{$Think.const.MODULE_NAME}";
    var __root_dir__ = "__ROOT_DIR__";
    var __lang__ = "{$admin_lang}";
    var __main_lang__ = "{$main_lang}";
</script>  
<script type="text/javascript" src="__STATIC__/common/js/jquery.min.js?v={$version}"></script>
<script type="text/javascript" src="__SKIN__/js/jquery-ui/jquery-ui.min.js?v={$version}"></script>
<script type="text/javascript" src="__PUBLIC__/plugins/layer-v3.1.0/layer.js?v={$version}"></script>
<script src="__SKIN__/js/global.js?v={$version}"></script>
</head>
<body style="background-color:#F4F4F4;padding:6px; overflow: auto;min-width:auto;">
    <form id="post_form">
        <div class="navboxs sort-list">
            {volist name='$menuList' id='vo'}
            <div>
                <label style="cursor: pointer;">
                    <span><input type="checkbox" name="checkedids[]" value="{$vo.id}" {if condition="$vo.checked"}checked{/if} /></span>{$vo.title}
                    <input type="hidden" name="ids[]" value="{$vo.id}" />
                </label>
            </div>
            {/volist} 
        </div>
        <div class="navboxs_bt" onclick="check_submit();">确认提交</div>
    </form>

    <script type="text/javascript">
        $(function () {
            /** 拖动排序相关 js*/
            $( ".sort-list" ).sortable({
                start: function( event, ui) {

                }
                ,stop: function( event, ui ) {

                }
            });
            $( ".sort-list" ).disableSelection();
        });

        var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引

        // 表单提交
        function check_submit(){
            layer_loading('正在处理');
            $.ajax({
                url: "{:url('Index/ajax_surveyquickmenu_taskflow', ['_ajax'=>1])}",
                type: 'POST',
                dataType: 'JSON',
                data: $('#post_form').serialize(),
                success: function(res){
                    layer.closeAll();
                    if (res.code == 1) {
                        var _parent = parent;
                        _parent.layer.close(parentObj);
                        _parent.layer.msg(res.msg, {shade: layer_shade, time: 1000}, function(){
                            _parent.gourl(res.url);
                        });
                    } else {
                        showErrorMsg(res.msg);
                    }
                },
                error: function(e){
                    layer.closeAll();
                    layer.alert(e.responseText, {icon:5, time:1500});
                }
            });

            return false;
        }
    </script>
    {include file="public/footer" /}